/** NurseDao */
package server.service.nurse;

import java.util.ArrayList;
import java.util.List;

import server.Database;
import domain.nurse.Nurse;
import domain.user.User;

/**
Interacts with the DATABASE
 * @author jessienewman
 * @version $Revision: 1.0 $
 */
public class NurseDao {
	/**
	 * Field DATABASE.
	 */
	private Database database;
	
	/**
	 * Constructor for NurseDao.
	 */
	public NurseDao() {
		database = Database.DATABASE;
	}
	
	/**
	 * Method getAllNurses.
	
	 * @return Nurse[] */
	public List<Nurse> getAllNurses() {
		ArrayList<Nurse> nur = new ArrayList<Nurse>();
		for (User u : database.users) {
			if (u instanceof Nurse) {
				nur.add((Nurse) u);
			}
		}
		return nur;
	}
	
	/**
	 * super's toString
	
	 * @return super's toString */
	public String toString() {
		return super.toString();
	}
}
